
from models import BlogEntry
from econoplot.views import page

from datetime import datetime
from django.http import HttpResponse
from ragendja.dbutils import get_object_list, get_object_or_404
from django.shortcuts import render_to_response
from google.appengine.ext import db
from google.appengine.api.users import is_current_user_admin

@page
def index (r):
	entries = BlogEntry.all ()
	entries.filter ("published =", True)
	entries.fetch (10)
	page_data = {'blog_entries':entries}
	return "blog_index.html", page_data

@page
def about (r):
	entry = BlogEntry.all ()
	entry.filter ("slug =", "about")
	entry.fetch (1)
	page_data = {"about" : entry[0]}
	return "about.html", page_data
